package com.orion.service;

import com.orion.entity.Result;
import com.orion.service.fallback.TestFeignHystrixServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Administrator
 * @date 2021/10/25
 */
@Service
@FeignClient(value = "provider", fallback = TestFeignHystrixServiceFallback.class)
public interface TestFeignHystrixService {

    @GetMapping("/providerHystrix")
    Result providerHystrix();

    @GetMapping("/providerPartHystrix")
    Result providerPartHystrix(@RequestParam("a") Integer a);

    @GetMapping("/providerPartCircuit")
    Result providerPartCircuit(@RequestParam("a") Integer a);
}
